package net.lainiao.other;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 * Created by Administrator on 2017/3/9.
 */
public class Main {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        for (int i = 1; i <= 30; i++) {
            list.add(i);
        }
        int current=0;
        int count = 0;
        while (count < 15) {
            Iterator<Integer> iterator=list.iterator();
            while(iterator.hasNext()){
                current++;
                Integer val=iterator.next();
                if(current==15){
                    System.out.println("移除了:"+val);
                    iterator.remove();
                    current=0;
                }
            }
            count++;
        }
    }
}
